/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#include "MkStateGridADataType.h"

CMkStateGridARequestBase::CMkStateGridARequestBase(const MkStateGridAMessageType& MsgType)
    : m_MsgType(MsgType)
{

}

CMkStateGridAMediaRequest::CMkStateGridAMediaRequest(const MkString& SessionId, const MkString& ChannelId, const MkString& RtpHost, Uint16 RtpPort, Uint8 Payload, BOOL bSubStream)
    : CMkStateGridARequestBase(MkStateGridAMedia)
    , m_SessionId(SessionId)
    , m_ChannelId(ChannelId)
    , m_RtpHost(RtpHost)
    , m_RtpPort(RtpPort)
    , m_Payload(Payload)
    , m_bSubStream(bSubStream)
{

}

CMkStateGridAMediaShutDownRequest::CMkStateGridAMediaShutDownRequest(const MkString& SessionId)
    : CMkStateGridARequestBase(MkStateGridAMediaShutDown)
    , m_SessionId(SessionId)
{

}

CMkStateGridAPtzControlRequest::CMkStateGridAPtzControlRequest(const MkString& ChannelId, MkStateGridPtzCommandType Cmd, Uint32 Param1, Uint32 Param2, Uint32 Param3, Uint32 Param4, Uint32 Param5, Uint32 Param6, Uint32 Param7)
    : CMkStateGridARequestBase(MkStateGridAPtzControl)
    , m_ChannelId(ChannelId)
    , m_Cmd(Cmd)
    , m_Param1(Param1)
    , m_Param2(Param2)
    , m_Param3(Param3)
    , m_Param4(Param4)
    , m_Param5(Param5)
    , m_Param6(Param6)
    , m_Param7(Param7)
{

}

CMkStateGridASubscribeRequest::CMkStateGridASubscribeRequest(const MkString& SubscribeId, Uint32 Expries, const MkStateGridASubscribeType& SubType, const MkMap<MkString, Uint32>& MapSubId)
    : CMkStateGridARequestBase(MkStateGridASubscribe)
    , m_SubscribeId(SubscribeId)
    , m_Expires(Expries)
    , m_MapSubCode(MapSubId)
    , m_SubType(SubType)
{

}

CMkStateGridAAlarmNotifyRequest::CMkStateGridAAlarmNotifyRequest(const MkString& StrState, const MkString& Code, const MkString& Name, const Uint32 AlarmType, const CMkTime& StartTime, const CMkTime& EndTime)
    : CMkStateGridARequestBase(MkStateGridASubscribeNotify)
    , m_StrState(StrState)
    , m_Code(Code)
    , m_Name(Name)
    , m_AlarmType(AlarmType)
    , m_StartTime(StartTime)
    , m_EndTime(EndTime)
{

}

CMkStateGridAStatusNotifyRequest::CMkStateGridAStatusNotifyRequest(const MkString& StrState, const MkString& Code, const MkString& Name, Uint32 Status)
    : CMkStateGridARequestBase(MkStateGridASubscribeNotify)
    , m_StrState(StrState)
    , m_Code(Code)
    , m_Name(Name)
    , m_Status(Status)
{

}

CMkStateGridAResponseBase::CMkStateGridAResponseBase(const MkStateGridAMessageType& MsgType)
    : m_MsgType(MsgType)
{

}

CMkStateGridASubscribeResponse::CMkStateGridASubscribeResponse(const MkString& SubscribeId, Uint32 Expires)
    : CMkStateGridAResponseBase(MkStateGridASubscribe)
    , m_SubscribeId(SubscribeId)
{

}

CMkStateGridAMediaResponse::CMkStateGridAMediaResponse(const MkString& SessionId, const MkString& RtpHost, Uint16 RtpPort, const EventResponseCallback& EventCb)
    : CMkStateGridAResponseBase(MkStateGridAMedia)
    , m_SessionId(SessionId)
    , m_RtpHost(RtpHost)
    , m_RtpPort(RtpPort)
    , m_EventCb(EventCb)
{

}